<?php

namespace app\common\command;

use app\common\logic\OrderLogic;
use think\console\Command;
use think\console\Input;
use think\console\Output;

/**
 * @package app\admin\model
 *  命令行
 */
class Second extends Command
{
    //再命令窗口中执行“php think second”  每10秒触发1次
    protected function configure()
    {
        $this->setName('second')
            ->setDescription('脚本');
    }

    protected function execute(Input $input, Output $output)
    {
        $orderLogic = new OrderLogic();
        $orderLogic->startCancelOrderJobs(); // 取消订单定时处理
        $orderLogic->orderExpireJobs(); // 订单定时处理预约即将过期的

        $output->writeln("成功");
    }
}